package org.jeecgframework.core.timer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Job {

 
//    @Scheduled(cron="*/10 * * * * *") 
//    public void s10(){
//        org.jeecgframework.core.util.LogUtil.info("==== 十秒执行一次=======10s");
//    }
//    
//    @Scheduled(cron="0 */1 * * * *") 
//    public void m1(){
//        org.jeecgframework.core.util.LogUtil.info("1m");
//    }
    
//    /**
//     * 每天1点执行一次
//     * */
//    @Scheduled(cron="0 0 1 * * ?")
//    public void oneOClockPerDay(){
//        org.jeecgframework.core.util.LogUtil.info("1h");
//    }

    @Autowired
    private JdbcTemplate jdbcTemplate;

    /**
     * 每月1号0点
     * */
    @Scheduled(cron="0 0 0 1 * ? ")
//    @Scheduled(cron="0/5 * * * * ? ")
    public void eachMonth(){
        jdbcTemplate.update("update z_takein set print = 0");
    }

    
    
}